<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Left Drawer</title>
  <style>
    body {
      margin: 0;
      padding: 0;
      background: #e9f8fc
    }

    .drawer {
      margin: 0 auto;
      margin-top: 5vh;
      height: 90vh;
      background-color: rgb(163, 211, 228);
      border-radius: 50px;
      width: 80vw;
      min-width: 1000px;
      position: relative;
      min-height: 875px;
    }


    .drawer-content {
      position: relative;
      height: 100%;
      background-color: rgb(255, 255, 255);
      border-radius: 50px;
      box-sizing: border-box;
      transition: transform .3s, box-shadow .2s;
    }

    .drawer-content.show {
      transform: translateX(60px);
      box-shadow: 5px 0 10px #a3d3e4;
    }

    .toggle-btn {
      position: absolute;
      right: 0px;
      top: 0px;
      cursor: pointer;
      transition: transform .3s;
    }

    .toggle-btn::after {
      position: relative;
      display: block;
      content: "";
      width: 10px;
      height: 10px;
      border-right: 5px solid rgb(255, 0, 136);
      border-top: 5px solid rgb(255, 0, 148);
      animation: shakeBorderColor .4s ease;
    }

    .toggle-btn:hover::after {
      animation: none;
    }

    @keyframes shakeBorderColor {
      0% {
        border-right-color: red;
        border-top-color: red;
        transform: translateX(0);
      }

      25% {
        border-right-color: blue;
        border-top-color: blue;
        transform: translateX(2px);
      }

      50% {
        border-right-color: red;
        border-top-color: red;
        transform: translateX(6px);
      }

      75% {
        border-right-color: green;
        border-top-color: green;
        transform: translateX(3px);
      }

      100% {
        border-right-color: red;
        border-top-color: red;
        transform: translateX(0);
      }
    }


    .drawer-content.show .toggle-btn {
      transform: rotateZ(180deg);
    }

    .toggle-btn input {
      position: absolute;
      opacity: 0;
    }

    .right-bottom-tips {
      width: 300px;
      height: 100px;
      background-color: #9fdafd;
      position: absolute;
      right: 0;
      bottom: 0;
      border-bottom-right-radius: 50px;

      border-top-left-radius: 20px;
      overflow: hidden;
    }

    .arrow {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 100px;
      height: 50px;
      border-top-left-radius: 20px;
      background-color: #ff7a59;
    }

    .menu {
      display: block;
      margin: 0;
      padding: 0;
      width: 60px;
      position: absolute;
      list-style: none;
      top: 50%;
      transform: translateY(-50%);
    }

    .menu-item {
      height: 50px;
      box-sizing: border-box;
      background-color: #ff7a59;
      margin-bottom: 10px;
      text-align: center;
      line-height: 50px;
      color: white;
    }

    .pull-left {
      float: left;
    }

    .left-side {
      width: 100%;
      height: 100%;
      margin-right: -300px;
    }

    .right-side {
      border-left: 1px solid #d5d5d5;
      box-sizing: border-box;
      width: 300px;
      height: 100%
    }
  </style>
</head>

<body>
  <div class="drawer">
    <ul class="menu">
      <li class="menu-item">Home</li>
      <li class="menu-item">Mail</li>
      <li class="menu-item">Inter</li>
      <li class="menu-item">Map</li>
      <li class="menu-item">Set</li>
    </ul>
    <div class="drawer-content ">
      <label class="toggle-btn" title="设置">
        <input type="checkbox">
      </label>

      <div class="pull-left left-side">

      </div>
      <div class="pull-left right-side" style="">
        <div class="right-bottom-tips">
          <div class="arrow"></div>
        </div>
      </div>

    </div>
  </div>

  <script>
    document.querySelector('.toggle-btn input').addEventListener('change', function (e) {
      if (e.target.checked) {
        document.querySelector('.drawer-content').classList.add("show")
      } else {
        document.querySelector('.drawer-content').classList.remove("show")
      }
    })
  </script>

</body>

</html>